<?php defined('SYSPATH') or die('No direct script access.');
 
class Model_Aviacompany extends Model {

    protected $_table = 'flights';

    public function getAll($city_from, $city_to) {
        $query = DB::select()
            ->from($this->_table)
            ->where('city_from','=',$city_from)
            ->and_where('city_to','=',$city_to)
            ->order_by('id','desc')
            ->execute();
        return $query;
    }

}